#ifndef __Graph_
#define __Graph_

#include "iostream"
#include "vector"
#include "fstream"
#include "iomanip"

using namespace std;
typedef vector<int> Array;
typedef vector<Array> Array2D;


class Graph
{
//private:
//	charArray2D Matrix;
private:
	int iVertex;       //luu dinh
protected:
	Array2D Matrix;
	//charArray cEdge;  //luu cac canh
	Array cLabel; //nhan dinh
	int iComponent; //so thanh phan lien thong
public:
	Graph();
	void Resize(int n);
	//void matrixInit(charArray2D &a, int n);
	//friend istream& operator>> (istream& inDevice, charArray2D &a);
	//friend ostream& operator<< (ostream& outDevice, charArray2D &a);
	void Input(char *cFileName);
	bool validGraph();
	virtual void Visit(int ,int ) = 0;
	int FindComponents();
	void Output(char *cFileName);
	~Graph();
};

#endif 